Thanks, I got everything working great!
Post
Replies
Boosts
Views
Activity
Ok, so a couple nights of trial and error I have both ends of this implemented. I can get a video drawing to a material via DrawableQueue, and I can display different imageFiles to each eye in a shaderGraphMaterial. I can't figure out how to glue the two bits together though... I changed the image files in the shader into color inputs, and then at load time I try to:
if var material = cube.model?.materials.first as? ShaderGraphMaterial{
do{
try material.setParameter(name: "left", value:.textureResource(drawableTextureManager.textureResource) ) // <-this throws a ShaderGraphMaterial.Error.incorrectTypeForParameterName
//try material.setParameter(name: "left", value:.color(CGColor(red: 1.0, green: 0.5, blue: 0.0, alpha: 1.0)) ) // <-this works
} catch {
print("oops")
}
cube.model?.materials = [material]
}
So I guess my questions are:
are color inputs the correct way to get textures into a ShaderGraphMaterial?
who do I setParameter with a texture/TextureResource/DrawableQueue
Thanks!
Thanks, I've submitted FB13615798 and FB13615765
Yes, there are options that do not involve writing back to disk, though admittedly they are complicated. For example, you could use a DrawableQueue instead of VideoMaterial, and update the drawable with your altered video frames during playback.
Ok, I can look into that... is there anyway to preserve 3d stereoscopic content when doing this?
Looks like I found a work around... rewriting the code to use SecStaticCodeCheckValidity instead does validate resources.
mike
Strangely, I've found compiling the app with the unedited lib causes Xcode to alter the dylib in some way that I can then copy it out of the product and successfully run install_name_tool
-mike
I just ran into this same issue... did you find a work around?